//编辑框控件
import 'package:beautiful_demo/common/res.dart';
import 'package:beautiful_demo/common/widget/widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class LoginEditWidget extends StatelessWidget {
  final String tips;
  final String placeholder;
  final TextEditingController textEditingController;
  final TextInputType keyType;
  final bool obscureText;

  const LoginEditWidget(this.tips, this.placeholder,this.textEditingController,{this.keyType,this.obscureText=false});

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 56.dp,
      margin: EdgeInsets.only(right: 30.dp),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text(
            tips,
            style: resTextStyle30.copyWith(fontSize: 16.sp),
          ),
          Expanded(
              child: CupertinoTextField(
                placeholder: placeholder,
                keyboardType: keyType,
                obscureText: obscureText,
                placeholderStyle: resTextStyle9C.copyWith(height: 1.4,fontSize: 16.sp),
                style: resTextStyle30.copyWith(height: 1.4,fontSize: 16.sp),
                controller: textEditingController,
                padding: EdgeInsets.zero,
                decoration: const BoxDecoration(color: Colors.transparent),
              )),
          LineWidget()
        ],
      ),
    );
  }
}

//圆圈控件
class RadialWidget extends StatelessWidget {
  final List<Color> colors;
  final double size;

  const RadialWidget(this.size,this.colors) : super();

  @override
  Widget build(BuildContext context) {
    return  Container(
      width: size,
      height: size,
      decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(250.dp),
          gradient:  RadialGradient(
              colors: colors)),
    );
  }
}


